﻿<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Empleados.aspx.vb" Inherits="Empleados" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div align="right" style="width: 891px">
    
        <table class="style1">
            <tr>
                <td align="center" colspan="3">
                <asp:Label ID="Label27" runat="server" Font-Size="Large" ForeColor="#9966FF" 
                    Text="Administracion de Empleados"></asp:Label>
                </td>
                <td align="left">
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="right">
                    &nbsp;</td>
                <td align="left">
                    &nbsp;</td>
                <td align="left">
                    &nbsp;</td>
                <td align="left">
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="Label1" runat="server" Text="Legajo:"></asp:Label>
                </td>
                <td align="left">
                    <asp:TextBox ID="txtLegajo" runat="server" ReadOnly="True"></asp:TextBox>
                </td>
                <td align="left">
                    &nbsp;</td>
                <td align="left">
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="Label2" runat="server" Text="Nombre:"></asp:Label>
                </td>
                <td align="left">
                    <asp:TextBox ID="txtNombre" runat="server" ReadOnly="True"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                        ControlToValidate="txtNombre" ErrorMessage="*" ValidationGroup="persona"></asp:RequiredFieldValidator>
                </td>
                <td align="right">
                    <asp:Label ID="Label4" runat="server" Text="Apellido:"></asp:Label>
                </td>
                <td align="left">
                    <asp:TextBox ID="txtApellido" runat="server" ReadOnly="True"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                        ControlToValidate="txtApellido" ErrorMessage="*" ValidationGroup="persona"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="Label6" runat="server" Text="Tipo Documento:"></asp:Label>
                </td>
                <td align="left">
                    <asp:DropDownList ID="ddlTipoDocumento" runat="server">
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" 
                        ControlToValidate="ddlTipoDocumento" Display="Dynamic" ErrorMessage="*" 
                        ValidationGroup="persona"></asp:RequiredFieldValidator>
                </td>
                <td align="right">
                    <asp:Label ID="Label7" runat="server" Text="Nro Documento"></asp:Label>
                    </td>
                <td align="left">
                    <asp:TextBox ID="txtNroDocumento" runat="server" MaxLength="8" ReadOnly="True"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" 
                        ControlToValidate="txtNroDocumento" Display="Dynamic" ErrorMessage="*" 
                        ValidationGroup="persona"></asp:RequiredFieldValidator>
                    <asp:CompareValidator ID="CompareValidator2" runat="server" 
                        ControlToValidate="txtNroDocumento" Display="Dynamic" ErrorMessage="*" 
                        Operator="DataTypeCheck" Type="Integer" ValidationGroup="persona"></asp:CompareValidator>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="Label5" runat="server" Text="Fecha Nacimiento:"></asp:Label>
                </td>
                <td align="left">
                    <asp:TextBox ID="txtFechaNacimiento" runat="server" ReadOnly="True"></asp:TextBox>
                    <asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="*" 
                        Operator="DataTypeCheck" Type="Date" 
                        ControlToValidate="txtFechaNacimiento" ValidationGroup="persona" 
                        Display="Dynamic"></asp:CompareValidator>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="txtFechaNacimiento" ErrorMessage="*" 
                        ValidationGroup="persona"></asp:RequiredFieldValidator>
                </td>
                <td align="right">
                    <asp:Label ID="Label8" runat="server" Text="E-mail:"></asp:Label>
                    </td>
                <td align="left">
                    <asp:TextBox ID="txtemail" runat="server" ReadOnly="True"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                        ControlToValidate="txtemail" ErrorMessage="*" 
                        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
                        ValidationGroup="persona"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td align="right" style="height: 139px">
                    <asp:Label ID="Label15" runat="server" Text="Direcciones:"></asp:Label>
                </td>
                <td align="left" colspan="2" style="height: 139px">
                    <table style="width: 100%">
                        <tr>
                            <td>
                                <asp:GridView ID="gvDireccionesPersonas" runat="server" 
                                    EmptyDataText="No hay direcciones cargadas" AutoGenerateColumns="False" 
                                    CellPadding="4" ForeColor="#333333" GridLines="None">
                                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                    <Columns>
                                        <asp:BoundField DataField="calle" HeaderText="Calle" />
                                        <asp:BoundField DataField="Barrio" HeaderText="Barrio" />
                                        <asp:BoundField DataField="tipo_direccion" HeaderText="Tipo Direccion" />
                                        <asp:BoundField DataField="localidad" HeaderText="Localidad" />
                                    </Columns>
                                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                    <SelectedRowStyle BackColor="#99CCFF" Font-Bold="True" ForeColor="#333333" />
                                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                    <EditRowStyle BackColor="#999999" />
                                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                </asp:GridView>
                            </td>
                            <td align="left" valign="middle">
                                <asp:Button ID="btnNuevaDireccion" runat="server" 
                                    Text="Administrar" ValidationGroup="persona" Enabled="False" />
                            </td>
                        </tr>
                    </table>
                </td>
                <td align="left" style="height: 139px">
                    </td>
            </tr>
            
            <tr>
                <td align="right">
                    &nbsp;</td>
                <td align="left">
                    &nbsp;</td>
                <td align="right">
                    &nbsp;</td>
                <td align="left">
                    &nbsp;</td>
            </tr>
            
            <tr>
                <td align="right">
                    <asp:Label ID="Label9" runat="server" Text="Departamento:"></asp:Label>
                </td>
                <td align="left">
                    <asp:DropDownList ID="ddlDepartamento" runat="server">
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                        ControlToValidate="ddlDepartamento" Display="Dynamic" ErrorMessage="*"></asp:RequiredFieldValidator>
                </td>
                <td align="right">
                    <asp:Label ID="Label10" runat="server" Text="Jefe:"></asp:Label>
                    </td>
                <td align="left">
                    <asp:DropDownList ID="ddlJefe" runat="server">
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" 
                        ControlToValidate="ddlJefe" Display="Dynamic" ErrorMessage="*"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="Label11" runat="server" Text="Salario:"></asp:Label>
                </td>
                <td align="left">
                    <asp:TextBox ID="txtSalario" runat="server" Width="69px" ReadOnly="True"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                        ControlToValidate="txtSalario" Display="Dynamic" ErrorMessage="*"></asp:RequiredFieldValidator>
                </td>
                <td align="right">
                    <asp:Label ID="Label12" runat="server" Text="Cargo:"></asp:Label>
                    </td>
                <td align="left">
                    <asp:DropDownList ID="ddlCargo" runat="server">
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" 
                        ControlToValidate="ddlCargo" Display="Dynamic" ErrorMessage="*"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td align="right" class="style2" style="height: 24px">
                    <asp:Label ID="Label13" runat="server" Text="Sucursal:"></asp:Label>
                </td>
                <td align="left" class="style2" style="height: 24px">
                    <asp:DropDownList ID="ddlSucursal" runat="server">
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
                        ControlToValidate="ddlSucursal" Display="Dynamic" ErrorMessage="*"></asp:RequiredFieldValidator>
                </td>
                <td align="right" class="style2" style="height: 24px">
                    <asp:Label ID="Label14" runat="server" Text="Fecha Ingreso:"></asp:Label>
                </td>
                <td align="left" class="style2" style="height: 24px">
                    <asp:TextBox ID="txtFechaIngreso" runat="server" ReadOnly="True"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" 
                        ControlToValidate="txtFechaIngreso" Display="Dynamic" ErrorMessage="*"></asp:RequiredFieldValidator>
                    <asp:CompareValidator ID="CompareValidator3" runat="server" 
                        ControlToValidate="txtFechaIngreso" Display="Dynamic" ErrorMessage="*" 
                        Operator="DataTypeCheck" Type="Date"></asp:CompareValidator>
                </td>
            </tr>
            <tr>
                <td align="right" colspan="2">
                    <asp:Button ID="btnNuevo" runat="server" Text="Nuevo" 
                        CausesValidation="False" />
                    <asp:Button ID="btnAceptar" runat="server" Text="Aceptar" />
                </td>
                <td align="left" colspan="2">
                    <asp:Button ID="btnCancelar" runat="server" CausesValidation="False" 
                        Text="Cancelar" />
                </td>
            </tr>
            <tr>
                <td align="right" colspan="2">
                    &nbsp;</td>
                <td align="left" colspan="2">
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="right" colspan="4">
    <asp:GridView ID="gvEmpleados" runat="server" AutoGenerateColumns="False" 
        CellPadding="4" DataKeyNames="id_empleado,id_tipo_documento,nro_documento,id_cargo,id_jefe,id_sucursal,id_departamento" 
        ForeColor="#333333" GridLines="None" AllowPaging="True">
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <Columns>
            <asp:BoundField DataField="id_empleado" HeaderText="Legajo" />
            <asp:BoundField DataField="apellido" HeaderText="Apellido" />
            <asp:BoundField DataField="nombre" HeaderText="Nombre" />
            <asp:BoundField DataField="tipo_documento" HeaderText="Tipo Documento" />
            <asp:BoundField DataField="nro_documento" HeaderText="N° documento" />
            <asp:BoundField DataField="fecha_nacimiento" HeaderText="Fecha Nacimiento" />
            <asp:BoundField DataField="Cargo" HeaderText="Cargo" />
            <asp:BoundField DataField="salario" HeaderText="Salario" />
            <asp:BoundField DataField="email" HeaderText="E-mail" />
            <asp:BoundField DataField="sucursal" HeaderText="Sucursal" />
            <asp:BoundField DataField="fecha_ingreso" HeaderText="Fecha Ingreso" />
            <asp:CommandField ShowSelectButton="True" />
            <asp:CommandField ButtonType="Image" DeleteImageUrl="~/Imagenes/trash.gif" 
                ShowDeleteButton="True" />
        </Columns>
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#99CCFF" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#999999" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    </asp:GridView>
                </td>
            </tr>
            </table>
    
    </div>
</asp:Content>
